{% extends '::layout.html.twig' %}

{% block title %}Créer Projet{% endblock%}

{% block titreNav %}Créer Projets{% endblock %}

{% block titreContent %}Création d'un Projet !{% endblock %}

{% block titreBreadcrumbs %}
<li><a href="#">Projets</a></li>
{% endblock %}

{% block contentnav %} 
<div class="sideWidget">
    <form method="post" {{ form_enctype(form) }}>
        <div class="formRow">{{ form_row(form.nom) }}</div>
        <div class="formRow">{{ form_row(form.date_debut) }}</div>
        <div class="formRow">{{ form_row(form.date_fin) }}</div>
        <div class="formRow">{{ form_row(form.ref_client) }}</div>
        <div class="formRow noBorderB">
            <input type="submit" class="buttonS bLightBlue" value="Ajouter">
        </div>
    </form>
</div>
{% endblock %}

{% block content %}
<div class="widget grid12">
    <table class="dTable dataTable">
        <thead>
            <tr>
                <th>Nom</th>
                <th>Date de début</th>
                <th>Date de fin</th>
                <th>Client</th>
            </tr>
        </thead>
        <tbody>
        {% for projet in projectdb %}
                <tr>
                    <td class="center">{{ projet.nom }}</td>
                    <td class="center">{{ projet.dateDebut.format('Y-m-d') }}</td>
                    <td class="center">{{ projet.dateFin.format('Y-m-d') }}</td>
                    <td class="center">{{ projet.refClient.email}}</td>
                </tr>

         {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock %}